<%
	String email = request.getParameter("email");
	if (email != null && !email.equals("")){
		boolean foundEmail = org.languageguide.user.UserManager.resetPassword(email);
		if (foundEmail){
			session.setAttribute("message", "A new password has been emailed to you.");
			response.sendRedirect("/user/login.jsp");
		}
		else{
			session.setAttribute("message", "We were unable to find your email. ");
			response.sendRedirect("/user/forgot_password.jsp");
		}
	}
	else{
		session.setAttribute("message", "Please enter an email address.");
		response.sendRedirect("/user/forgot_password.jsp");
	}
	
%>